package com.demo.gateway.rest;

import java.util.Arrays;
import java.util.List;

import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.stereotype.Component;

/**
 * @author: demo
 * @date: 2020年6月23日
 * @Document : rest拦截器工厂
 */
@Component
public class RestInterceptorFactory {

	public  List<ClientHttpRequestInterceptor> asRestInterceptors(ClientHttpRequestInterceptor ...interceptors){
		return Arrays.asList(interceptors);
	}
	
	public  ClientHttpRequestInterceptor getRequestLoggerInterceptor() {
		return new RequestLoggerInterceptor();
	}
}
